﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace UniRx
{
	// Token: 0x02000407 RID: 1031
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct CollectionMoveEvent<T> : IEquatable<CollectionMoveEvent<T>>
	{
		// Token: 0x06001517 RID: 5399 RVA: 0x0005E9A1 File Offset: 0x0005CDA1
		public CollectionMoveEvent(int oldIndex, int newIndex, T value)
		{
			this = default(CollectionMoveEvent<T>);
			this.OldIndex = oldIndex;
			this.NewIndex = newIndex;
			this.Value = value;
		}

		// Token: 0x1700018E RID: 398
		// (get) Token: 0x06001518 RID: 5400 RVA: 0x0005E9BF File Offset: 0x0005CDBF
		// (set) Token: 0x06001519 RID: 5401 RVA: 0x0005E9C7 File Offset: 0x0005CDC7
		public int OldIndex { get; private set; }

		// Token: 0x1700018F RID: 399
		// (get) Token: 0x0600151A RID: 5402 RVA: 0x0005E9D0 File Offset: 0x0005CDD0
		// (set) Token: 0x0600151B RID: 5403 RVA: 0x0005E9D8 File Offset: 0x0005CDD8
		public int NewIndex { get; private set; }

		// Token: 0x17000190 RID: 400
		// (get) Token: 0x0600151C RID: 5404 RVA: 0x0005E9E1 File Offset: 0x0005CDE1
		// (set) Token: 0x0600151D RID: 5405 RVA: 0x0005E9E9 File Offset: 0x0005CDE9
		public T Value { get; private set; }

		// Token: 0x0600151E RID: 5406 RVA: 0x0005E9F2 File Offset: 0x0005CDF2
		public override string ToString()
		{
			return string.Format("OldIndex:{0} NewIndex:{1} Value:{2}", this.OldIndex, this.NewIndex, this.Value);
		}

		// Token: 0x0600151F RID: 5407 RVA: 0x0005EA20 File Offset: 0x0005CE20
		public override int GetHashCode()
		{
			return this.OldIndex.GetHashCode() ^ this.NewIndex.GetHashCode() << 2 ^ EqualityComparer<T>.Default.GetHashCode(this.Value) >> 2;
		}

		// Token: 0x06001520 RID: 5408 RVA: 0x0005EA6C File Offset: 0x0005CE6C
		public bool Equals(CollectionMoveEvent<T> other)
		{
			return this.OldIndex.Equals(other.OldIndex) && this.NewIndex.Equals(other.NewIndex) && EqualityComparer<T>.Default.Equals(this.Value, other.Value);
		}
	}
}
